The Database API > Database API functions > MMDB.getColumnList()

 

MMDB.getColumnList()

Availability

Dreamweaver UltraDev 1.0

Description

Gets a list of columns from an executed SQL SELECT statement.

Arguments

connName, statement

connName is an UltraDev connection name as specified in the Connection Manager. It is used to make a database connection to a live data source.
statement is the SQL SELECT statement to execute.

Returns

An array of strings representing a list of columns that match the SELECT statement, or an error if the SQL statement was invalid or the connection could not be made.

Example

The code var columnArray = MMDB.getColumnList("EmpDB","Select * from Employees") returns the following array of strings:

columnArray[0] = "EmpName", columnArray[1] = "EmpFirstName", ¬
columnArray[2] = "Age"